const wrapper = require('../utils/responseWrapper');

// formId:
// version:
const data = {
  formId: '9527',
  version: '1.0',
  name: '报销单',
  describe: '',
  layoutDetail: [
    {
      size: 'medium',
      titleLayout: 'title-horz',
      isHideTitle: 'false',
      lineType: 'line1',
      lineColor: '#000000',
      componentType: 'line',
      title: '基本信息',
      componentId: '1502846255058',
      componentField: '1502846255058'
    },
    {
      size: 'medium',
      titleLayout: 'title-horz',
      componentType: 'basicData',
      title: '数据源',
      componentId: '999',
      componentField: '999',
      dataSource: 'xxx',
    },
    {
      componentId: '1000', // 组件编码，前端使用
      componentType: 'appData', // 组件类型，前端使用
      componentField: '1000', // 绑定字段，服务端用
      title: '关联表单', // 显示文本，前端使用
    },
    {
      componentId: '1001', // 组件编码，前端使用
      componentType: 'selectPsn', // 组件类型，前端使用
      componentField: '1001', // 绑定字段，服务端用
      title: '报销人', // 显示文本，前端使用
    },
    {
      componentId: '1002',
      componentType: 'radio',
      componentField: '1002',
      title: '报销类型',
      content: null,
      options: [{ key: '01', value: '团建费用报销' }, { key: '02', value: '出差费用报销' }]
    },
    {
      componentId: '1003',
      componentType: 'table',
      componentField: '1003',
      title: '费用报销明细',
      showSreial: 'true',
      defaultRows: '3',
      layoutDetail: [
        {
          componentId: '10031', componentType: 'input', componentField: '10031', size: 'medium', title: '明细描述', titleLayout: 'title-vert',
        }, {
          componentId: '10032', componentType: 'money', componentField: '10032', size: 'medium', title: '明细金额', titleLayout: 'title-vert',
        }, {
          componentId: '10033', componentType: 'date', componentField: '10033', size: 'medium', title: '明细发生日期', titleLayout: 'title-vert',
        }
      ]
    },
    {
      componentId: '1004', componentType: 'input', componentField: '1004', size: 'medium', title: '报销总金额', relation: { component: '1001', componentField: 'name' }
    },
    {
      componentId: '1005', componentType: 'serial', componentField: '1005', size: 'medium', title: '编号', prefix: [{ componentId: '@const@', componentField: 'XXXX' }], suffix: [{ componentId: '1001', title: '报销人' }],
    },
  ]
};

module.exports = wrapper(data);
console.log(JSON.stringify(module.exports));
